<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>EncryptedStorage (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>

  <script type="text/javascript" src="//www.google.com/jsapi"></script>
  <script type="text/javascript">
     google.load("visualization", "1", {packages:["orgchart"]});
     var _loadingVisualizations = true;
  </script>

  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">storage.EncryptedStorage</span>
        <span>Extends</span>
        <span class="fn-name">
          <a href="class_goog_storage_CollectableStorage.html">
          goog.storage.CollectableStorage
</a>
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    Provides an encrypted storage. The keys are hashed with a secret, so
their existence cannot be verified without the knowledge of the secret.
The values are encrypted using the key, a salt, and the secret, so
stream cipher initialization varies for each stored value.


  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="local_closure_goog_storage_encryptedstorage.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/local/closure/goog/storage/encryptedstorage.js">Git</a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
  <tr><td><span class="type"><a href="class_goog_storage_Storage.html">goog.storage.Storage</a></span></td><td></td></tr>
  <tr><td><span class="type"><a href="class_goog_storage_RichStorage.html">goog.storage.RichStorage</a></span></td><td><span class="type"><a href="class_goog_storage_Storage.html">goog.storage.Storage</a></span></td></tr>
  <tr><td><span class="type"><a href="class_goog_storage_ExpiringStorage.html">goog.storage.ExpiringStorage</a></span></td><td><span class="type"><a href="class_goog_storage_RichStorage.html">goog.storage.RichStorage</a></span></td></tr>
  <tr><td><span class="type"><a href="class_goog_storage_CollectableStorage.html">goog.storage.CollectableStorage</a></span></td><td><span class="type"><a href="class_goog_storage_ExpiringStorage.html">goog.storage.ExpiringStorage</a></span></td></tr>
  <tr><td>goog.storage.EncryptedStorage</td><td><span class="type"><a href="class_goog_storage_CollectableStorage.html">goog.storage.CollectableStorage</a></span></td></tr>
</table>
</div>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
</table>
</div>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.storage.EncryptedStorage(<span><span class="arg">mechanism</span>,&nbsp;<span class="arg">secret</span></span>)
  </div>

   <h3>Parameters</h3>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">mechanism</span>
        : <span>!</span><span class="type"><a href="class_goog_storage_mechanism_IterableMechanism.html">goog.storage.mechanism.IterableMechanism</a></span>
        <div class="entryOverview">The underlying
    storage mechanism.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">secret</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The secret key used to encrypt the storage.</div>
     </td>
   </tr>
  </table>


<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_storage_EncryptedStorage.html">
              goog.storage.EncryptedStorage
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.storage.EncryptedStorage.prototype.decryptValue_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">decryptValue_<span class="args">(<span class="arg">salt</span>,&nbsp;<span class="arg">key</span>,&nbsp;<span class="arg">value</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
      </div>


     <div class="entryOverview">
       Decrypts a value using a key, a salt, and the secret.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">salt</span>
        : <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&gt;
        <div class="entryOverview">The salt.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">key</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The key.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">value</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The encrypted value.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&nbsp;
            The decrypted value.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_encryptedstorage.js.source.html#line148">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.storage.EncryptedStorage.prototype.encryptValue_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">encryptValue_<span class="args">(<span class="arg">salt</span>,&nbsp;<span class="arg">key</span>,&nbsp;<span class="arg">value</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
      </div>


     <div class="entryOverview">
       Encrypts a value using a key, a salt, and the secret.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">salt</span>
        : <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&gt;
        <div class="entryOverview">The salt.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">key</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The key.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">value</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The cleartext value.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&nbsp;
            The encrypted value.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_encryptedstorage.js.source.html#line120">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.storage.EncryptedStorage.prototype.getWrapper"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getWrapper<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_encryptedstorage.js.source.html#line177">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.storage.EncryptedStorage.prototype.hashKeyWithSecret_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">hashKeyWithSecret_<span class="args">(<span class="arg">key</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
      </div>


     <div class="entryOverview">
       Hashes a key using the secret.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">key</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The key.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&nbsp;
            The hash.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_encryptedstorage.js.source.html#line103">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.storage.EncryptedStorage.prototype.remove"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">remove<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_encryptedstorage.js.source.html#line201">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.storage.EncryptedStorage.prototype.set"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">set<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_encryptedstorage.js.source.html#line156">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_storage_CollectableStorage.html">
              goog.storage.CollectableStorage
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.storage.CollectableStorage.prototype.collect"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">collect<span class="args">(<span class="arg">opt_strict</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Cleans up the storage by removing expired keys.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_strict</span>
        : <span class="type">boolean=</span>
        <div class="entryOverview">Also remove invalid keys.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_collectablestorage.js.source.html#line129">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry protected">
       <td class="access"></td>






  <td>
    <a name="goog.storage.CollectableStorage.prototype.collectInternal"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">collectInternal<span class="args">(<span class="arg">keys</span>,&nbsp;<span class="arg">opt_strict</span>)</span>
        </span>
        &#8658; <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&gt;
      </div>


     <div class="entryOverview">
       Cleans up the storage by removing expired keys.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">keys</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&gt;
        <div class="entryOverview">List of all keys.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_strict</span>
        : <span class="type">boolean=</span>
        <div class="entryOverview">Also remove invalid keys.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&gt;&nbsp;
            a list of expired keys.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_collectablestorage.js.source.html#line114">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.storage.CollectableStorage.prototype.getExpiredKeys_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getExpiredKeys_<span class="args">(<span class="arg">keys</span>,&nbsp;<span class="arg">opt_strict</span>)</span>
        </span>
        &#8658; <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&gt;
      </div>


     <div class="entryOverview">
       Iterate over keys and returns those that expired.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">keys</span>
        : <span class="type">goog.iter.Iterable</span>
        <div class="entryOverview">keys to iterate over.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_strict</span>
        : <span class="type">boolean=</span>
        <div class="entryOverview">Also return invalid keys.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&gt;&nbsp;
            Keys of values that expired.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_collectablestorage.js.source.html#line53">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_storage_ExpiringStorage.html">
              goog.storage.ExpiringStorage
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.storage.ExpiringStorage.prototype.getWrapper"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getWrapper<span class="args">(<span class="arg">key</span>,&nbsp;<span class="arg">opt_expired</span>)</span>
        </span>
        &#8658; (<span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)
      </div>


     <div class="entryOverview">
       Get an item wrapper (the item and its metadata) from the storage.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">key</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The key to get.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_expired</span>
        : <span class="type">boolean=</span>
        <div class="entryOverview">If true, return expired wrappers as well.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;(<span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)&nbsp;
            The wrapper, or undefined if not found.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_expiringstorage.js.source.html#line132">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.storage.ExpiringStorage.prototype.set"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">set<span class="args">(<span class="arg">key</span>,&nbsp;<span class="arg">value</span>,&nbsp;<span class="arg">opt_expiration</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Set an item in the storage.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">key</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The key to set.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">value</span>
        : <span class="type">*</span>
        <div class="entryOverview">The value to serialize to a string and save.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_expiration</span>
        : <span class="type">number=</span>
        <div class="entryOverview">The number of miliseconds since epoch
    (as in goog.now()) when the value is to expire. If the expiration
    time is not provided, the value will persist as long as possible.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_expiringstorage.js.source.html#line106">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_storage_RichStorage.html">
              goog.storage.RichStorage
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.storage.RichStorage.prototype.get"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">get<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_richstorage.js.source.html#line147">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.storage.RichStorage.prototype.getWrapper"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getWrapper<span class="args">(<span class="arg">key</span>)</span>
        </span>
        &#8658; (<span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)
      </div>


     <div class="entryOverview">
       Get an item wrapper (the item and its metadata) from the storage.

WARNING: This returns an Object, which once used to be
goog.storage.RichStorage.Wrapper. This is due to the fact
that deserialized objects lose type information and it
is hard to do proper typecasting in JavaScript. Be sure
you know what you are doing when using the returned value.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">key</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The key to get.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;(<span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)&nbsp;
            The wrapper, or undefined if not found.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_richstorage.js.source.html#line137">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.storage.RichStorage.prototype.set"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">set<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_richstorage.js.source.html#line119">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_storage_Storage.html">
              goog.storage.Storage
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.storage.Storage.prototype.get"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">get<span class="args">(<span class="arg">key</span>)</span>
        </span>
        &#8658; <span class="type">*</span>
      </div>


     <div class="entryOverview">
       Gets an item from the data storage.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">key</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The key to get.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type">*</span>&nbsp;
            Deserialized value or undefined if not found.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_storage.js.source.html#line66">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.storage.Storage.prototype.remove"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">remove<span class="args">(<span class="arg">key</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Removes an item from the data storage.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">key</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The key to remove.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_storage.js.source.html#line94">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.storage.Storage.prototype.set"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">set<span class="args">(<span class="arg">key</span>,&nbsp;<span class="arg">value</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Sets an item in the data storage.


     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">key</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The key to set.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">value</span>
        : <span class="type">*</span>
        <div class="entryOverview">The value to serialize to a string and save.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_storage.js.source.html#line51">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Instance Properties</h2>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_storage_EncryptedStorage.html">
              goog.storage.EncryptedStorage
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.storage.EncryptedStorage.prototype.cleartextSerializer_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">cleartextSerializer_</span>
        : <span class="type"><a href="class_goog_json_Serializer.html">goog.json.Serializer</a></span>
     </div>


     <div class="entryOverview">
       The JSON serializer used to serialize values before encryption. This can
be potentially different from serializing for the storage mechanism (see
goog.storage.Storage), so a separate serializer is kept here.


     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_encryptedstorage.js.source.html#line93">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>





  <a name="goog.storage.EncryptedStorage.prototype.constructor"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">constructor</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_encryptedstorage.js.source.html#line59">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.storage.EncryptedStorage.prototype.secret_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">secret_</span>
        : 
     </div>


     <div class="entryOverview">
       The secret used to encrypt the storage.


     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_encryptedstorage.js.source.html#line82">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_storage_CollectableStorage.html">
              goog.storage.CollectableStorage
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.storage.CollectableStorage.prototype.constructor"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">constructor</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_collectablestorage.js.source.html#line39">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_storage_ExpiringStorage.html">
              goog.storage.ExpiringStorage
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.storage.ExpiringStorage.prototype.constructor"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">constructor</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_expiringstorage.js.source.html#line36">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_storage_RichStorage.html">
              goog.storage.RichStorage
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.storage.RichStorage.prototype.constructor"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">constructor</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_richstorage.js.source.html#line41">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_storage_Storage.html">
              goog.storage.Storage
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry protected">
       <td class="access"></td>





  <a name="goog.storage.Storage.prototype.mechanism"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">mechanism</span>
        : <span class="type"><a href="class_goog_storage_mechanism_Mechanism.html">goog.storage.mechanism.Mechanism</a></span>
     </div>


     <div class="entryOverview">
       The mechanism used to persist key-value pairs.


     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_storage.js.source.html#line41">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>










<div class="section">
  <table class="horiz-rule">


  </table>
</div>



<h2>Static Properties</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry protected">
       <td class="access"></td>





  <a name="goog.storage.EncryptedStorage.SALT_KEY"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.EncryptedStorage.</span><span class="entryName">SALT_KEY</span>
        : 
     </div>


     <div class="entryOverview">
       Metadata key under which the salt is stored.


     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_encryptedstorage.js.source.html#line73">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.storage.EncryptedStorage.superClass_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.EncryptedStorage.</span><span class="entryName">superClass_</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_encryptedstorage.js.source.html#line59">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package storage</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="storage.EncryptedStorage"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
